module iopmp_config_top (
    input                               iopmpcfg_clk_i        ,
    input                               iopmpcfg_rst_n_i      ,
    input [31:0]                        iopmpcfg_haddr_i      ,
    // input [2 :0]                        iopmpcfg_hburst_i     ,
    input [3 :0]                        iopmpcfg_hprot_i      ,
    input                               iopmpcfg_hsel_i       ,
    input [2 :0]                        iopmpcfg_hsize_i      ,
    input [1 :0]                        iopmpcfg_htrans_i     ,
    input [31:0]                        iopmpcfg_hwdata_i     ,
    input                               iopmpcfg_hwrite_i     ,

    input [31:0]                        iopmpcfg_rd1_i        ,
    input [31:0]                        iopmpcfg_rd2_i        ,
    input [31:0]                        iopmpcfg_rd3_i        ,

    // input                               iopmpst_hready_i     ,
    // input [1 :0]                        iopmpst_hresp_i      ,

    output [31:0]                       iopmpcfg_hrdata_o     ,
    output                              iopmpcfg_hready_o     ,
    output [1 :0]                       iopmpcfg_hresp_o      ,
    output                              iopmpcfg_intr_o,

    output                              iopmpcfg_node_clk_o   ,
    output                              iopmpcfg_node_rstn_o  ,
    output                              iopmpcfg_cfg_en_o     ,
    output [7:0]                        iopmpcfg_node_addr_o  ,
    output                              iopmpcfg_node_wen_o   ,
    output                              iopmpcfg_node_ren_o   ,
    output [31:0]                       iopmpcfg_node_wdata_o 
);

wire [31:0]                             cross2set_readdata   ;
wire                                    st2cross_cfg_en      ;
wire [7:0]                              st2cross_node_addr   ;
wire                                    st2cross_node_wen    ;
wire                                    st2cross_node_ren    ;
wire [31:0]                             st2cross_node_wdata  ;
iopmp_set_module u_iopmp_set_module(
    
    .iopmpst_clk_i        (iopmpcfg_clk_i     ),
    .iopmpst_rst_n_i      (iopmpcfg_rst_n_i   ),
    .iopmpst_haddr_i      (iopmpcfg_haddr_i   ),
    // .iopmpst_hburst_i     (iopmpcfg_hburst_i  ),
    .iopmpst_hprot_i      (iopmpcfg_hprot_i   ),
    .iopmpst_hsel_i       (iopmpcfg_hsel_i    ),
    .iopmpst_hsize_i      (iopmpcfg_hsize_i   ),
    .iopmpst_htrans_i     (iopmpcfg_htrans_i  ),
    .iopmpst_hwdata_i     (iopmpcfg_hwdata_i  ),
    .iopmpst_hwrite_i     (iopmpcfg_hwrite_i  ),
  
    .iopmpst_readdata_i   (cross2set_readdata),


    .iopmpst_hrdata_o     (iopmpcfg_hrdata_o   ),
    .iopmpst_hready_o     (iopmpcfg_hready_o   ),
    .iopmpst_hresp_o      (iopmpcfg_hresp_o    ),
    .iopmpst_intr_o       (iopmpcfg_intr_o     ),

    .iopmpst_node_clk_o   (iopmpcfg_node_clk_o ),
    .iopmpst_node_rstn_o  (iopmpcfg_node_rstn_o),
    .iopmpst_cfg_en       (st2cross_cfg_en    ),
    .iopmpst_node_addr    (st2cross_node_addr ),
    .iopmpst_node_wen_o   (st2cross_node_wen  ),
    .iopmpst_node_ren_o   (st2cross_node_ren  ),
    .iopmpst_node_wdata_o (st2cross_node_wdata)     


        
);

iopmp_crossbar_module u_iopmp_crossbar_module(

    .iopmpst_clk_i        (iopmpcfg_clk_i     ),
    .iopmpst_rst_n_i      (iopmpcfg_rst_n_i   ),

    .iopmpcb_cfg_en_i     (st2cross_cfg_en    ),
    .iopmpcb_node_addr_i  (st2cross_node_addr ),
    .iopmpcb_node_wen_i   (st2cross_node_wen  ),
    .iopmpcb_node_ren_i   (st2cross_node_ren  ),
    .iopmpcb_node_wdata_i (st2cross_node_wdata),

    .iopmpcb_rd1_i        (iopmpcfg_rd1_i      ),
    .iopmpcb_rd2_i        (iopmpcfg_rd2_i      ),
    .iopmpcb_rd3_i        (iopmpcfg_rd3_i      ),

    .iopmpcb_rddata_o     (cross2set_readdata  ),

    .iopmpcb_node_clk_o   (iopmpcfg_node_clk_o  ),
    .iopmpcb_node_rstn_o  (iopmpcfg_node_rstn_o ),
   .iopmpcb_cfg_en_o      (iopmpcfg_cfg_en_o    ),
   .iopmpcb_node_addr_o   (iopmpcfg_node_addr_o ),
   .iopmpcb_node_wen_o    (iopmpcfg_node_wen_o  ),
   .iopmpcb_node_ren_o    (iopmpcfg_node_ren_o  ),
   .iopmpcb_node_wdata_o  (iopmpcfg_node_wdata_o)
);

endmodule